<template>
  <div class="list">
    <div
      class="newlist"
      v-for="item in list"
      :key="item.id"
      @click="clickup(item.id, item.click)"
    >
      <div class="left">
        <img :src="item.img_url" alt="" />
      </div>
      <div class="right">
        <p>{{ item.title }}</p>
        <div class="publish">
          <div class="left">{{ item.add_time }}</div>
          <div class="right1">点击:{{ item.click }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    list: Array,
    require: true,
  },
  methods: {
    clickup(id, click) {
      this.$router.push({ path: `/NewsDetial/${id}` });
      console.log(click);
    },
  },
};
</script>

<style lang="less" scoped>
.newlist {
  padding: 0 10px;
  display: flex;

  //   align-items: center;
  border-bottom: 1px solid #ccc;
  .left {
    img {
      margin-top: 16px;
      width: 50/ 375 * 100vw;
    }
  }
  .right {
    padding-left: 8px;
    width: 100%;
    p {
      word-break: break-all;
      word-wrap: break-word;
      color: #808080;
    }
    .publish {
      display: flex;
      flex: 1;
      justify-content: space-between;
      font-size: 14px;
      color: #66beff;
      margin-bottom: 10px;
      width: 100%;
    }
  }
}
</style>